package com.summer.data.parameter.clob;

import com.summer.data.parameter.ClobParameter;

import java.io.IOException;
import java.io.Writer;

/**
 * @author 345480567@qq.com
 */
public class StringClobParameter implements ClobParameter {

    private String data;

    public StringClobParameter(String data) {
        this.data = data;
    }

    @Override
    public void write(Writer writer) {
        try {
            writer.write(data);
        } catch (IOException e) {
            // todo:
            throw new RuntimeException(e);
        }
    }

    @Override
    public String toString() {
        return "StringClobParameter{}" + data.length();
    }
}
